www.gusucode.com > 良精ASP微博管理系统 V1.0 > 良精ASP微博管理系统 V1.0\code\setting.asp

    <!--#include file="Include/LiangjingConn.asp"-->
<!--#include file="Include/Function.asp"-->
<!--#include file="Include/Md5.asp"-->
<%
if Session("_WUserID") = "" then
	Response.Redirect("Login.asp")
	Response.End()
end if
action = request.Form("action")
Set Rs = Server.CreateObject("adodb.recordset")	

if action = "editMyInfo" then
	Sql = "Select * from Liangjing_User Where User_ID="&Session("_WUserID")
	Rs.open Sql,conn,1,2
		Session("_UserCoolName")= Request.Form("User_CoolName") 
		Rs("User_CoolName")	= Request.Form("User_CoolName")
		Rs("User_Name")		= Request.Form("User_Name")
		if Request.Form("User_Pass") <> "" then
			Rs("User_Pass")	= Md5(Request.Form("User_Pass"))
		end if
		Rs("User_Photo")	= Request.Form("User_Photo")
		Rs("User_Address")	= Request.Form("User_Address")
		Rs("User_Address2")	= Request.Form("User_Address2")
		Rs("User_PostCode")	= Request.Form("User_PostCode")
		Rs("User_Tel")		= Request.Form("User_Tel")
		Rs("User_Sex")		= Request.Form("User_Sex")
		Rs("User_Birthday")	= Request.Form("User_Birthday")
		if  Rs("User_Birthday")<>"" and IsNumerIC(Rs("User_Birthday"))=false then
		Call Wodig.Msgbox2("出生年份必须是数字",0,"Setting.asp")
		end if
		Rs("User_HomeWeb")	= Request.Form("User_HomeWeb")
		Rs("User_Demo")		= Request.Form("User_Demo")	
	Rs.Update
	Set Rs = nothing
	Call Wodig.Msgbox2("恭喜您!您的资料已经设置成功!",2,"My.asp?User_ID="&Session("_WUserID"))
	Response.End()
end if

	Sql = "Select * from Liangjing_User Where User_ID="&Session("_WUserID")
	Rs.open Sql,conn,1,2
	if not Rs.eof then
		User_CoolName 	= Rs("User_CoolName")
		User_Name 		= Rs("User_Name")
		User_Pass 		= Rs("User_Pass")
		User_Email 		= Rs("User_Email")
		User_Photo 		= Rs("User_Photo")
		User_Address 	= Rs("User_Address")
		User_Address2 	= Rs("User_Address2")
		User_PostCode 	= Rs("User_PostCode")
		User_Tel 		= Rs("User_Tel")
		User_Sex 		= Rs("User_Sex")
		User_Birthday 	= Rs("User_Birthday")
		User_HomeWeb 	= Rs("User_HomeWeb")
		User_Demo 		= Rs("User_Demo")
		User_Photo		= Rs("User_Photo")
	end if
%>
<%
	if request.querystring("action")="uphoto" and Web_UphotoShow=true then
%>
<Script Language="JavaScript">

//前端客户选择函数

function pick(v) {
window.opener.document.<%=request.querystring("formname")%>.<%=request.querystring("editname")%>.value=v;
window.opener.document.<%=request.querystring("FormName")%>.<%=request.querystring("ImgSrc")%>.src=v;
    window.close();
    return false;
}
</Script>
<%
	str=""
    for i=1 to Web_UphotoNum
	str=str&"<a href=""javascript:pick('"&Web_uphotoPath&i&Web_UphotoExt&"')""><img src="""&Web_uphotoPath&i&Web_UphotoExt&""" style=""width:40px;height:40px;border:0px""></a>&nbsp;&nbsp;"
	if i=7 then str=str&"<br><br>" 
    next

	response.write str
    response.end
end if
%>
<!--#include file="Include/header.asp"-->
</div>
<%Response.Write("<div id=""headRound"" class=""clear""><span class=""left""></span><span class=""right""></span></div>")%>





<script language="javascript">
	function loadPhoto(obj){
		document.all._ctl0_img_UserFace.src=obj.value;
	}
</script>
<script language=javascript>
function onlyNum()
{
 if(!(event.keyCode==46)&&!(event.keyCode==8)&&!(event.keyCode==37)&&!(event.keyCode==39))
  if(!((event.keyCode>=48&&event.keyCode<=57)||(event.keyCode>=96&&event.keyCode<=105)))
    event.returnValue=false;
}
</script>


<div id="mainWrapper" class="clear" style="min-height:260px;background:#C9F1FF;);">
	<div class="wording">


	</div>
	<div class="loginBox">
<table width="<%=Web_TPageWidth%>" height="20"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td></td>
  </tr>
</table>
<table width="<%=Web_TPageWidth%>" height="20"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25" class="ptttd1"><% =Session("_UserCoolName") %>&nbsp;的个人设置</td>
  </tr>
</table>
<table width="<%=Web_TPageWidth%>"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><table width="98%"  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr> </tr>
      <tr>
        <td height="1" background="Images/dot.jpg"></td>
      </tr>
      <tr>
        <td height="5"></td>
      </tr>
    </table>
    <table width="98%"  border="0" align="center" cellpadding="0" cellspacing="5">
      <tr>
        <td height="25" valign="top" class="mn">&nbsp;我的设置</td>
      </tr>
      <tr>
        <td valign="top">
		
		
		<form action="Setting.asp" method="post" name="frmdata">
		<table width="100%"  border="0" cellspacing="3" cellpadding="0">
		  <tr valign="top">
			<td width="60">邮 箱:</td>
			<td><input name="user_coolname" type="text" value="<% = User_Email %>" maxlength="50" size="25" disabled />
		  		<span Class="Bold TColor5">不可修改*</span></td>
		  </tr>
          <tr valign="top">
            <td width="60">昵 称:</td>
            <td><input name="user_coolname" type="text" value="<% = User_CoolName %>" maxlength="20" size="25" />
              <span Class="Bold TColor5">*</span></td>
          </tr>
		  <tr valign="top">
            <td width="60">密 码:</td>
            <td><input name="user_pass" type="text" value="" maxlength="25" size="25" />      
                            不为空时,则修改密码</td>
          </tr>
          <tr valign="top">
            <td>头 像:</td>
            <td>
			<table width="100%"><tr><td  width="70"><img src="<%=User_Photo%>" alt="" name="src_img_2" border="0" id="src_img_2" style="height:48px;width:48px;" /><input name="user_photo" type="hidden" value="<% =user_photo %>" onChange="javascript:loadPhoto(this);"></td><td><% if Web_UphotoShow=true then %><a href="#" onClick="window.open('setting.asp?action=uphoto&formname=frmdata&ImgSrc=src_img_2&editname=user_photo','','status=no,scrollbars=no,top=200,left=310,width=420,height=165')" >系统头像列表</a><% end if %><br />
          		<%
				if Web_UploadphotoShow=true then
				%>
				<a href="#" onClick="window.open('Upload/upload_image.asp?formname=frmdata&ImgSrc=src_img_2&editname=user_photo','','status=no,scrollbars=no,top=200,left=310,width=420,height=165')">自定义上传</a>
				<% end if
				
				%>
					</td></tr></table>		
			
			</td> 			
          </tr>
          <tr valign="top">
            <td>常 居 地:</td>
            <td><select name="user_address" id="user_address">  
			  <option value="北京" <% if User_Address = "北京" then Response.Write(" Selected") %>>北京</option>
              <option value="浙江" <% if User_Address = "浙江" then Response.Write(" Selected") %>>浙江</option>
              <option value="安徽" <% if User_Address = "安徽" then Response.Write(" Selected") %>>安徽</option>
              <option value="重庆" <% if User_Address = "重庆" then Response.Write(" Selected") %>>重庆</option>
              <option value="福建" <% if User_Address = "福建" then Response.Write(" Selected") %>>福建</option>
              <option value="甘肃" <% if User_Address = "甘肃" then Response.Write(" Selected") %>>甘肃</option>
              <option value="广东" <% if User_Address = "广东" then Response.Write(" Selected") %>>广东</option>
              <option value="广西" <% if User_Address = "广西" then Response.Write(" Selected") %>>广西</option>
              <option value="贵州" <% if User_Address = "贵州" then Response.Write(" Selected") %>>贵州</option>
              <option value="海南" <% if User_Address = "海南" then Response.Write(" Selected") %>>海南</option>
              <option value="河北" <% if User_Address = "河北" then Response.Write(" Selected") %>>河北</option>
              <option value="黑龙江" <% if User_Address = "黑龙江" then Response.Write(" Selected") %>>黑龙江</option>
              <option value="河南" <% if User_Address = "河南" then Response.Write(" Selected") %>>河南</option>
              <option value="香港" <% if User_Address = "香港" then Response.Write(" Selected") %>>香港</option>
              <option value="湖北" <% if User_Address = "湖北" then Response.Write(" Selected") %>>湖北</option>
              <option value="湖南" <% if User_Address = "湖南" or User_Address = "" then Response.Write(" Selected") %>>湖南</option>
              <option value="江苏" <% if User_Address = "江苏" then Response.Write(" Selected") %>>江苏</option>
              <option value="江西" <% if User_Address = "江西" then Response.Write(" Selected") %>>江西</option>
              <option value="吉林" <% if User_Address = "吉林" then Response.Write(" Selected") %>>吉林</option>
              <option value="辽宁" <% if User_Address = "辽宁" then Response.Write(" Selected") %>>辽宁</option>
              <option value="澳门" <% if User_Address = "澳门" then Response.Write(" Selected") %>>澳门</option>
              <option value="内蒙古" <% if User_Address = "内蒙古" then Response.Write(" Selected") %>>内蒙古</option>
              <option value="宁夏" <% if User_Address = "宁夏" then Response.Write(" Selected") %>>宁夏</option>
              <option value="青海" <% if User_Address = "青海" then Response.Write(" Selected") %>>青海</option>
              <option value="山东" <% if User_Address = "山东" then Response.Write(" Selected") %>>山东</option>
              <option value="上海" <% if User_Address = "上海" then Response.Write(" Selected") %>>上海</option>
              <option value="山西" <% if User_Address = "山西" then Response.Write(" Selected") %>>山西</option>
              <option value="陕西" <% if User_Address = "陕西" then Response.Write(" Selected") %>>陕西</option>
              <option value="四川" <% if User_Address = "四川" then Response.Write(" Selected") %>>四川</option>
              <option value="天津" <% if User_Address = "天津" then Response.Write(" Selected") %>>天津</option>
              <option value="台湾" <% if User_Address = "台湾" then Response.Write(" Selected") %>>台湾</option>
              <option value="新疆" <% if User_Address = "新疆" then Response.Write(" Selected") %>>新疆</option>
              <option value="西藏" <% if User_Address = "西藏" then Response.Write(" Selected") %>>西藏</option>
              <option value="云南" <% if User_Address = "云南" then Response.Write(" Selected") %>>云南</option>
            </select>
              <span class="Bold TColor5">*</span></td>
            </tr>
          <tr valign="top">
            <td>性 别:</td>
            <td><span id="_ctl0_rdolt_UserSex">
			 <input id="User_Sex" type="radio" name="user_sex" value="1" <% if User_Sex=true then Response.Write(" Checked") %>/>
              男
              <input id="User_Sex" type="radio" name="user_sex" value="0" <% if User_Sex=false then Response.Write(" Checked") %> />
              女              
            </span></td>
          </tr>
          <tr valign="top">
            <td>出生年份:</td>
            <td><input name="user_Birthday" type="text" maxlength="6" size="6" id="user_Birthday" value="<% = User_Birthday %>" onkeydown="onlyNum();" />
              年</td>
          </tr>
          <tr valign="top">
            <td>个人主页:</td>
            <td><input name="user_homeweb" type="text" maxlength="200" size="30" id="user_homeweb" value="<% = User_HomeWeb %>" /></td>
          </tr>
          <tr valign="top">
            <td>自我介绍:</td>
            <td><textarea name="user_demo" rows="6" cols="40" id="user_demo"><% = User_Demo %></textarea></td>
          </tr>
          <tr valign="top">
            <td> </td>
            <td>
				<input type="submit" name="_ctl0:btn_Submit" value=" 提 交 " onClick="if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); " language="javascript" id="_ctl0_btn_Submit" />
				<input type="button" name="_ctl0:btn_Submit" value=" 撤 消 " onClick="history.back();" language="javascript" id="_ctl0_btn_Submit" />
              	<input type="hidden" name="action" value="editMyInfo" />
			</td>
          </tr>
        </table>
		</form>
		
		</td>
      </tr>
    </table>
      <table width="98%" height="1"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td background="Images/dot.jpg"></td>
        </tr>
      </table>
      <table width="98%" height="1"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td background="Images/dot.jpg"></td>
        </tr>
      </table></td>
    <td width="1" valign="top" bgcolor="#E1E1E1"></td>
    <td width="<%=Web_RightWidth%>" valign="top"><table width="95%"  border="0" align="center" cellpadding="0" cellspacing="3">
      <tr>
        <td>请认真填写你的身份内容,让更多的薄友认识你哦!呵呵。。。。
		
<script type="text/javascript"><!--
google_ad_client = "pub-3406709034811813";
/* 200x200, 创建于 10-6-28 */
google_ad_slot = "1578354907";
google_ad_width = 200;
google_ad_height = 200;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>


<%Call WoDig.MquerLogin()%>
		
		
		</td>
      </tr>
    </table></td>
  </tr>
</table>
<br/>



	</div>
</div>
<%Response.Write("<div id=""footRound"" class=""clear""><span class=""left""></span><span class=""right""></span></div>"&vbcr)%>















<!--#include file="Include/footer.asp"-->